home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 6712 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.7 KB

  1. Path: ix.netcom.com!netnews
  2. From: Henry Cross <hcross@ix.netcom.com>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: && operator question
  5. Date: Sun, 18 Feb 1996 08:37:09 -0800
  6. Organization: i586 Box @Irvine, Ca.
  7. Message-ID: <312755B5.2C7A@ix.netcom.com>
  8. References: <4fu69a$b7e@sphinx.Gsu.EDU> <31236240.1417@oc.com> <fcusack-1502961453260001@mudskipper.cac.psu.edu> <3123AAB9.FBE@oc.com>
  9. NNTP-Posting-Host: irv-ca13-08.ix.netcom.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-NETCOM-Date: Sun Feb 18  8:36:21 AM PST 1996
  14. X-Mailer: Mozilla 2.0 (Win95; I)
  15.  
  16. Larry Weiss wrote:
  17. > frank. wrote:
  18. >  >
  19. >  > In article <31236240.1417@oc.com>, Larry Weiss <lfw@oc.com> wrote:
  20. >  >
  21. >  > > Matthew A Johnson wrote:
  22. >  > >  > if(expression1 && expression2)
  23. >  > >  >      some statement;
  24. >  > >  > My question is, if expression1 is false will expression2 get evaluated at
  25. >  > >  > all?
  26. >  > > No.   Why do you ask that question here?
  27. >  > Why wouldn't he ask it here? It is a C question...
  28. > I am trying to understand why someone would go to the trouble (and have the
  29. > patience) to ask such a trivial question that could easily be answered by
  30. > consultation to any C language textbook.
  31. > I have a slightly hidden agenda as well by posting this reply in the newsgroup
  32. > ....that is the general education of the infrequent readers of this group....
  33. > that such simple questions should first be resolved privately.     Or at least,
  34. > disquise the question in sheep's clothing....for example:
  35. >    Why is C designed to require short circuit evaluation with respect to
  36. >    some operators (for instance &&) ?
  37. >    Isn't C somewhat unique in mandating short circuit evaluation for the
  38. >    logical AND (&&) operator?  BASIC and FORTRAN don't do this.
  39. >    Why did the designers of C mandate the short circuit evaluation of the
  40. >    && operator?
  41. > That way, you'll be quickly informed if your assumption is incorrect
  42. > (you get to ask the question) and be much less likely to get "educated"
  43. > about the nettiquete issues.   You also just might learn some background
  44. > about the C language, as well as the operational realities.   But better
  45. > by far to just read a book (you'll get the answer instantly).
  46.  
  47.     While I agree a look in any C text should've cleared this up. I DO
  48.   NOT agree that simply stating the question in an overly verbose and
  49.   pretentious manner makes it somehow OK.  That's akin to the old
  50.   verbage that BS that has passed thru a computer has somehow become
  51.   enobled. Poppy cock! It's still BS.
  52.     In any event as long as the poster has made some attempt to resolve
  53.   his/her own question thru traditional means, vice knee jerk reaction
  54.   to post, the question is legitimate.
  55.  
  56. regards,
  57. H.Cross
  58. hcross@ix.netcom.com
  59.